package com.yi.serviceorder.remote;

import com.yi.internalcommon.dto.Car;
import com.yi.internalcommon.dto.ResponseResult;
import com.yi.internalcommon.responese.OrderDriverResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    @GetMapping("/city-driver/is-alailable-driver")
    ResponseResult<Boolean> isAvailableDriver(@RequestParam("cityCode") String cityCode);

    /**
     * 根据车辆id查找订单需要的司机信息
     * @param carId
     * @return
     */
    @GetMapping("/get-available-driver/{carId}")
    ResponseResult<OrderDriverResponse> getAvailableDriver(@PathVariable("carId")Long carId);

    @GetMapping("/car")
    ResponseResult<Car> getCarById(@RequestParam("carId")  Long carId);
}
